package com.Listener;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
public class LoginController {
    @RequestMapping("/Login.do")
    public String LoginIn(HttpSession session){
        session.setAttribute("count","1");
        session.setAttribute("count","2");
        System.out.println("登录");
        return "LoginListener";
    }
    @RequestMapping("/LoginOut.do")
    public String LoginOut(HttpSession session){
        session.removeAttribute("count");
        System.out.println("登出");
        return "LoginListener";
    }
}
